package main

import (
	"TCPServer/Handlers"
	"TCPServer/Handlers/HTTPHandler"
	"TCPServer/Service"
	"net/http"
	"time"
)

func main() {
	http.HandleFunc("/getHeroList", HTTPHandler.GetHeroList)
	http.ListenAndServe("0.0.0.0:7778", nil)

	s := Service.NewServer("0.0.0.0", 7777)
	s.AddRouter(30102, Handlers.NewHandler01())
	s.AddRouter(30101, Handlers.NewHandlerLogin())
	s.Start()

	for {
		time.Sleep(10 * time.Second)
	}
}
